<html>
<body>

<?

include_once("config.php");
include_once("functions.php");
session_start();

$userName=$_POST['userName']; 
$password=$_POST['password'];

registerUser($userName, $password);
$user = checkLogin($userName, $password);

if ($user)
{
	$_SESSION["user"] = $user;
	header("location:chooseteam.php");
}
else
{
	echo "REGISTER FAILED";
	//header("location:default.php");
}


?>

</body>
</html>